#pragma once

#include "cocos2d.h"

class Player : public cocos2d::Layer
{
public:
	Player();
	virtual	~Player();
	CREATE_FUNC(Player);
	static Player*	create(uint32_t uid, uint8_t dir);

	virtual bool	init();
	virtual	void	update(float dt);

	bool	LoadRes(uint32_t uid, uint8_t dir);

	void	SetMapPos(int x, int y, int dir);
	void	SetMapDir(int dir);

	int		GetPosX(void) const;
	int		GetPosY(void) const;
private:
	uint32_t				_idRes;
	cocos2d::Animate*		_ani;
	int				_posX, _posY, _dir;
};